//void, Obj owner, Obj victim
Unit u;

if (!owner.AsUnit.IsValid)
	return;
	
if (rand(1000) > 300)
	return;
        
if (owner.IsValid()){
	u = Place("GGhost", owner.pos+Point(-50, -50), owner.player);
	if(u.IsValid){
        u.SetLevel(owner.AsUnit.level);
        u.SetStamina(5);
        u.SetCommand("spawn");
        SwapSelectedObj(owner, u);
    }
}
